The present invention relates to a method of position recognition for visual recognition apparatus to be used in robots. More particularly, the invention relates to a method of position recognition by which the position of an object is detected from an image picked up by an image pickup means.
In recent years, a method of position recognition, by which the position of an object is detected from an image picked up by an image pickup device, has been widely used in visual recognition apparatus of robots in various types of production facilities.
From among the methods of position recognition for the above-mentioned application, a conventional example of recognizing the position of a circular object is described below with reference to FIGS. 7 to 9.
FIG. 7 shows the basic arrangement of an apparatus for recognizing the position of a circular object, which employs the conventional method of position recognition. The apparatus of the conventional example basically comprises an image pickup means 21, a binarization means 22, and a labeling center-of-gravity position calculating means 23.
The principle of the conventional method of position recognition is as follows. An image of a circular object picked up by the image pickup means 21 differs in image gray level between the inside and outside of the profile of the circular object. Accordingly, the image picked up by the image pickup means 21 is first binarized by the binarization means 22 according to an image gray-level threshold value. Depending on whether the image is positive or negative, either a higher gray-level image or a lower gray-level image of the binarized image represents the circular object. Therefore, one of the images representing the circular object is interconnected through the common labeling process to form an image representing the circular object and then the position of the center of gravity of the image is calculated by the labeling center-of-gravity position calculating means 23. Thus, the resulting position of center of gravity gives the center-of-gravity position of the circular object.
However, in the above conventional method, when one portion of the background in contact with the circumference of the circular object has a brightness close to that of the circular object, this background portion 25 adds to a binarized image 24 of the circular object as its one portion as shown in FIG. 8, so that a center of gravity 27 of the added-up binarized image is calculated. As a result, the correct center 26 of the circular object could not be determined.
Also, in the above conventional method, for example when the circular object is a lower tapped hole and part of the lower tapped hole is hidden by the peripheral edge of an upper tapped hole, part of the outer periphery of the image 24 of the circular object picked up by the image pickup means 21 is hidden by a background 28 formed by the peripheral edge of the upper tapped hole, as shown in FIG. 9. The result is that a center of gravity 29 of the hidden binarized image is calculated. Thus, the correct center 26 of the circular object could not be determined.